ContextCapture User Guide

Configuration file parameters

The config.json file is found in the App folder, where App is the web application. The file can be used to define the list of available scenes. A scene can then be accessed via an alias using the address bar scene parameter.

By default, the App folder is created during a webgl-ready production, and is stored next to the production’s 3D data. In this case, config.json contains the relative address of the 3D data, and will look something similar to this:

    {
	"URLs": [
	  {
		"alias":"YourProduction",
		"scene":"../Scene/YourProduction.3mx"
	  }
	]
    }

The configuration file is in JSON format. It indicates that there is a single 3MX scene the application can access, with the path to the root 3MX indicated by the “scene” tag. The alias is used to identify the scene by a name.

To create the list of available scenes, you need to modify the file config.json, by adding the web address and an alias for each scene. For example, the file below points to 2 scenes; the first scene is stored on the same server as the web application, while the 2nd one is stored on CloudFront:

{
  "URLs": [
    {
      "alias": "Quarry",
      "scene": "../DATA_3D/Quarry/Scene/Quarry.3mx"
    },
    {
      "alias": "Marseille ",
      "scene": "http://deh9aqlpmcj1j6.cloudfront.net/Marseille/Scene/Marseille.3mx"
    }    
  ]
}

To switch between one scene or another in the web application, it is sufficient to give the alias as scene parameter in the address bar. For example,

  • will show the Quarry scene above, and
  • will show the Marseille scene stored on CloudFront.

If you modify the config.json, you should make sure your modifications can be read by the web application by validating the JSON format of the file. You can do this by copy-pasting the entire content of the file in a JSON validator, such as: